<template>
	<view  class="header" >
		<view class="statusBar" :style="{ height: statusBarHeight + 'PX'}"></view>
		<view class="content">
			<view class="back" @click="back">
				<image src="../../static/images/back.png" mode=""></image>
			</view>
			<view class="title">
				<text>{{ title }}</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			title: {
				type: String
			},
			customColor: {
				type: Boolean,
				default: false
			}
		},
		data() {
			return {
				statusBarHeight: this.$systemInfo.statusBarHeight,
			};
		},
		methods: {
			back() {
				uni.navigateBack()
			}
		}
	}
</script>

<style lang="scss" scoped>
	.header {
		display: flex;
		flex-direction: column;
		width: 100%;
		height: 150rpx;
		background-image: linear-gradient( 135deg, #90F7EC 10%, #32CCBC 100%);
	}

	.content {
		flex: 1;
		display: flex;

		
		.back {
			display: flex;
			justify-content: center;
			align-items: center;
			width: 100rpx;
			height: 100%;
			
			image {
				width: 40rpx;
				height: 40rpx;
			}
		}
		
		.title {
			flex: 1;
			display: flex;
			justify-content: center;
			align-items: center;
			margin-left: -100rpx;
			color: #fff;
			
			text {
				font-weight: bold;
			}
			
		}
	}
</style>
